<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">


<body>
	<div>
		<table>
			<tr>
				<th align="left"><h2>Add Location</h2>
				</th>
				<th><a href="<c:url value="/master/location/searchLocation"/>"
					class="bt_green"><span class="bt_green_lft"></span><strong>Back
							to Location List</strong><span class="bt_green_r"></span> </a>
					
					<a href="<c:url value="/master/location/insertFloor"/>"
					class="bt_green"><span class="bt_green_lft"></span><strong>Add Floor
							 </strong><span class="bt_green_r"></span> </a>
				</th>
			</tr>
			<c:if test="${empty floors}">
				<tr>
					<td colspan="2" align="center"><font color="red"><sup>*</sup>
							The <label>Floor</label> has not described yet, please follow this <a
							href="<c:url value="/master/location/insertFloor"/>">link</a> for further configuration</font>
					</td>
				</tr>
			</c:if>
			<tr>
				<td colspan="2">
					<form action="<c:url value="insertLocation"/>" method="post">
						<table id="rounded-corner"
							summary="2007 Major IT Companies' Profit">
							<tr>
								<td align="right"><label>Floor:</label></td>
								<td>
		                	 	<select name="Floor.floor" id="floor">
		                	 	<c:forEach var="floors" items="${floors}" varStatus="status">
									<option value="${floors.id }">${floors.floorName }</option>
								</c:forEach>
								</select>
		                	 	</td>
							</tr>
							<tr>
								<td align="right"><label>Position:</label></td>
								<td><input type="text" class="input" name="position"
									size="40" /></td>
							</tr>
							<tr>
								<td></td>
								<td align="left">
									<c:choose>
										<c:when test="${empty floors}">
											<input type="submit" value="Save" class="button" disabled="disabled"/>
										</c:when>
										<c:otherwise>
											<input type="submit" value="Save" class="button" />
										</c:otherwise>
									</c:choose>
								</td>
							</tr>
						</table>
					</form>
				</td>
			</tr>
		</table>
	</div>
</body>
</html>
